//
//  MJCollectionViewController.h
//  快速集成下拉刷新
//
//  Created by mj on 14-1-3.
//  Copyright (c) 2014年 itcast. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HeadItem.h"
#define CLOSEPAGE 4
#define OPENPAGE 8
@class MJCollectionViewController;
@protocol MJCollectionViewControllerDelegate <NSObject>
-(void)didselectCell:(HeadItem *)item Num:(NSInteger)n;
-(void)panCollectionItem:(NSInteger)num CGRECT:(CGRect)frame;
-(void)collectionViewforscreenFlag;
@end
@interface MJCollectionViewController : UICollectionViewController<UICollectionViewDelegate>//<HeadItemDeleagte>
Strong UICollectionViewFlowLayout *layout;
Strong UIView *clickView; //点击后的view

Strong UIView *yelloView;
Strong UIView *panView;
Assign CGRect tmpr;
Assign NSInteger num; // 控制缩略图的数字
Assign NSInteger pagenum; //控制每一业的初始num
Assign NSInteger pageBtnnum; // 翻到第几页
Assign NSInteger allPage; // 所有缩略图的个数
Strong NSMutableArray *thumbPage;
Assign NSInteger clickNum; //点击的第几个缩略图
Assign NSInteger figureNum; //托屏幕到第几个
Assign NSInteger panNum; //滑动的第几个
Assign NSInteger allPagenumber; //共多少页
Assign BOOL flagplay;
Assign BOOL thumbFlag;
Assign NSInteger nowThumb;
@property(nonatomic,assign)CGFloat initTouchPosY;
@property(nonatomic,assign)CGFloat initTouchPosX;

//Strong UIPanGestureRecognizer *panGestureRecognizer;
Assign id<MJCollectionViewControllerDelegate> delegate;
-(void)counstView:(NSArray *)arr;
@end
